package com.atguigu.client;

import com.atguigu.entity.CartInfo;
import com.atguigu.entity.OrderInfo;
import com.atguigu.result.RetVal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "shop-order")
public interface OrderFeignClient {

    //1.订单的确认信息
    @GetMapping("/order/confirm")
    public RetVal confirm();



    //3.根据订单id查询订单信息
    @GetMapping("/order/getOrder/{orderId}")
    public OrderInfo getOrder(@PathVariable Long orderId);


    //5.保存订单及订单详情
    @PostMapping("/order/saveOrderAndDetail")
    public Long saveOrderAndDetail(@RequestBody OrderInfo orderInfo);

    //订单列表查询
    @GetMapping("/order/{pageNo}/{pageSize}")
    public RetVal getOrderPageList(@PathVariable Integer pageNo,@PathVariable Integer pageSize);
}
